<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 基础样式 */
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
        }

        /* 卡片容器 */
        .card {
            width: 300px;
            height: 400px;
            perspective: 1000px;
            /* 启用 3D 透视 */
        }

        /* 卡片内部容器 */
        .card-inner {
            width: 100%;
            height: 100%;
            position: relative;
            transform-style: preserve-3d;
            /* 保持 3D 空间 */
            transition: transform 0.8s ease;
            /* 添加翻转动画 */
        }

        /* 卡片悬停时翻转 */
        .card:hover .card-inner {
            transform: rotateY(180deg);
            /* 绕 Y 轴旋转 180 度 */
        }

        /* 卡片正面和背面共用样式 */
        .card-front,
        .card-back {
            width: 100%;
            height: 100%;
            position: absolute;
            backface-visibility: hidden;
            /* 隐藏背面 */
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        /* 卡片正面样式 */
        .card-front {
            background-color: #fff;
        }

        .card-front img {
            width: 100%;
            height: auto;
            border-radius: 10px 10px 0 0;
        }

        .card-front h3 {
            margin: 20px 0;
            font-size: 1.5rem;
            color: #333;
        }

        /* 卡片背面样式 */
        .card-back {
            background-color: #007bff;
            color: white;
            transform: rotateY(180deg);
            /* 初始状态为背面 */
        }

        .card-back h3 {
            margin: 20px 0;
            font-size: 1.5rem;
        }

        .card-back p {
            margin: 10px 20px;
            font-size: 1rem;
        }

        .card-back button {
            margin-top: 20px;
            padding: 10px 20px;
            background-color: white;
            color: #007bff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1rem;
            transition: background-color 0.3s ease;
        }

        .card-back button:hover {
            background-color: #f0f0f0;
        }
    </style>
</head>

<body>
    <div class="card">
        <div class="card-inner">
            <div class="card-front">
                <img src="http://shopimg.cloudvast.com/shopimg/ed32f99e-ea34-4e4a-9c5f-c777424c1dae/zW31KJnp1V.jpg" alt="Front Image">
                <h3>3D翻转正面标题</h3>
            </div>
            <div class="card-back">
                <h3>背面标题</h3>
                <p>这里是卡片的背面内容，可以展示更多详细信息。</p>
                <button>了解更多</button>
            </div>
        </div>
    </div>
</body>

</html>